﻿namespace OasisCiq.Xpil
{
    using System;
    using System.Linq;

    /// <summary>
    /// List of types of documents
    /// </summary>
    public class DocumentTypeList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[] 
        {
            "Passport",
            "DriverLicense",
            "CreditCard",
            "BankCard",
            "KeyCard",
            "AccessCard",
            "IdentificationCard",
            "Certificate",
            "MileageProgram"
        };

        public DocumentTypeList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}